package com.hut.oa.model.dao.discuss;


import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.data.repository.query.Param;

import com.hut.oa.model.bean.DiscussActive;
import com.hut.oa.model.bean.DiscussArea;

public interface DiscussActiveDao extends PagingAndSortingRepository<DiscussActive, Long>{
	//投票帖子
	@Query("from DiscussActive da")
	Page<DiscussActive> activeDiscussList(Pageable pageable);
	
	//根据帖子查出活动贴
	@Query("from DiscussActive da where da.discuss=:discuss")
	DiscussActive activeOne(@Param("discuss") DiscussArea discuss);
	
	
	
}
